#coding:UTF-8
from django.conf.urls import patterns, include, url
from django.contrib import admin

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'blog_2.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)), #可以使用设置好的url进入后台
    url(r'^$','article.views.home'),
    url(r'^(?P<id>\d+)/$', 'article.views.detail', name='detail'),
    url(r'^test/$','article.views.test'),
    url(r'^archives/$','article.views.archives',name='archives'),
    url(r'^archives/$','article.views.archives',name='archives'),
    url(r'^about/$','article.views.about_me',name='about_me'),
#     url(r'^searchByTag/$','article.views.search_tag',name='search_tag'),
#     url(r'^(?P<tag>\w+)/$', 'article.views.search_tag', name='search_tag'),
    url(r'^search/$','article.views.search',name='search'),
    url('^markdown/', include( 'django_markdown.urls')),
    url(r'^tag(?P<tag>\w+)/$', 'article.views.tag', name='tag'),
    url(r'^category(?P<category>\w+)/$', 'article.views.category', name='category'),
    url(r'^ueditor/',include('DjangoUeditor.urls' )),

)
from django.conf import settings

if settings.DEBUG:
    urlpatterns += patterns('',
                            url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
                                {'document_root': settings.MEDIA_ROOT}),
                            )
